import request from '@/utils/request';
// 订单列表
export const orderList = params => request({
  url: '/shop/order/index',
  method: 'GET',
  params
});
// 订单主要详情
export const orderGetDetail = params => request({
  url: '/shop/order/detail',
  method: 'POST',
  data: params
});
// 客户列表
export const customerList = params => request({
  url: '/shop/order/customerList',
  method: 'GET',
  params
});
// 报货数据导出
export const exportCargo = params => request({
  url: '/shop/order/export',
  method: 'GET',
  params
});
// 客户列表
export const warehouseList = params => request({
  url: '/shop/order/warehouse',
  method: 'GET',
  params
});
// 客户详情
export const customerDetail = params => request({
  url: '/shop/order/customer',
  method: 'GET',
  params
});
// 商品列表
export const goodsList = params => request({
  url: '/shop/order/goodsList',
  method: 'GET',
  params
});
// 订单商品详情
export const orderGoodsDetail = params => request({
  url: '/shop/order/orderGoodsDetail',
  method: 'POST',
  data: params
});
// 订单商品删除，新增，修改数量
export const updateOrderGoods = params => request({
  url: '/shop/order/updateOrderGoods',
  method: 'POST',
  data: params
});
// 订单操作记录
export const orderLog = params => request({
  url: '/shop/order/record',
  method: 'POST',
  data: params
});
// 订单基本信息修改
export const orderDetail = params => request({
  url: '/shop/order/update',
  method: 'POST',
  data: params
});
// 订单跟进列表
export const orderFollow = params => request({
  url: '/shop/order/orderFollow',
  method: 'POST',
  data: params
});
// 订单创建
export const orderCreate = params => request({
  url: '/shop/order/create',
  method: 'POST',
  data: params
});
// 订单跟进添加
export const createFollow = params => request({
  url: '/shop/order/createFollow',
  method: 'POST',
  data: params
});
// 订单支付确认跟进添加
export const createPayFollow = params => request({
  url: '/shop/order/createPayFollow',
  method: 'POST',
  data: params
});
// 订单状态修改
export const checkOrder = params => request({
  url: '/shop/order/checkOrder',
  method: 'POST',
  data: params
});
// 订单作废
export const cancelOrder = params => request({
  url: '/shop/order/cancelOrder',
  method: 'POST',
  data: params
});
// 订单下推
export const orderPush = params => request({
  url: '/shop/order/orderPush',
  method: 'POST',
  data: params
});
// 订单设置发货
export const sendOrder = params => request({
  url: '/shop/order/sendOrder',
  method: 'POST',
  data: params
});
// 订单修改金蝶单号
export const editKingNo = params => request({
  url: '/shop/order/editKingNo',
  method: 'POST',
  data: params
});
// 订单编辑配送信息
export const saveDelivery = params => request({
  url: '/shop/order/delivery',
  method: 'POST',
  data: params
});
// ---------------------//
// 金蝶日志列表
export const journalList = params => request({
  url: '/shop/kingdee/log',
  method: 'GET',
  params
});
// 金蝶推送异常
export const failList = params => request({
  url: '/shop/kingdee/fail',
  method: 'GET',
  params
});
// 金蝶日志列表
export const againPush = params => request({
  url: '/shop/kingdee/push',
  method: 'POST',
  data: params
});
// 收货地址
export const addressList = params => request({
  url: '/crm/customerAddress/list',
  method: 'GET',
  params
});
// -------------- 促销活动 -------------//
// 活动列表
export const activityList = params => request({
  url: '/shop/activity/index',
  method: 'GET',
  params
});
// 活动详情
export const activityDetail = params => request({
  url: '/shop/activity/detail',
  method: 'GET',
  params
});
// 活动详情
export const customerAddress = params => request({
  url: '/crm/customerAddress/index',
  method: 'GET',
  params
});
// 活动商品列表
export const getActivityGoods = params => request({
  url: '/shop/goods/getActivityGoods',
  method: 'POST',
  data: params
});
// 新增活动
export const createActivity = params => request({
  url: '/shop/activity/create',
  method: 'POST',
  data: params
});
// 提前结束
export const finishedForward = params => request({
  url: '/shop/activity/finishedForward',
  method: 'POST',
  data: params
});
// 编辑活动
export const updateActivity = params => request({
  url: '/shop/activity/update',
  method: 'POST',
  data: params
});

// 微信支付记录列表
export const wxPayOrder = params => request({
  url: '/shop/order/wxPayOrder',
  method: 'GET',
  params
});
// 订单支付记录
export const PayLog = params => request({
  url: '/shop/order/payLog',
  method: 'GET',
  params
});
// 订单支付退款记录
export const RefundLog = params => request({
  url: '/shop/order/refundLog',
  method: 'GET',
  params
});

// 物流跟踪
export const express = params => request({
  url: '/shop/order/express',
  method: 'GET',
  params
});

// 货到付款-申请
export const createCashFollow = params => request({
  url: '/shop/order/createCashFollow',
  method: 'POST',
  data: params
});

// 货到付款-审核
export const createCheckFollow = params => request({
  url: '/shop/order/createCheckFollow',
  method: 'POST',
  data: params
});

// 聚合支付
export const AggregatePay = params => request({
  url: '/shop/order/orderAggregatePay',
  method: 'GET',
  params
});

// 赠品审批
export const createFreeGoodsFollow = params => request({
  url: '/shop/order/createFreeGoodsFollow',
  method: 'POST',
  data: params
});

// 订单支付记录导出
export const payLogExport = params => request({
  url: '/shop/order/payLogExport',
  method: 'GET',
  params
});

// 订单退款记录导出
export const refundLogExport = params => request({
  url: '/shop/order/refundLogExport',
  method: 'GET',
  params
});
